package com.zghl.service.impl;

import com.zghl.dao.UnitDao;
import com.zghl.pojo.Equipment;
import com.zghl.pojo.Unit;
import com.zghl.service.UnitService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @Author:wangbosen
 * @Date:2020/7/27 16:29
 * Description
 */
@Service
public class UnitServiceImpl implements UnitService {

    @Resource
    private UnitDao unitDao;

    @Override
    public List<Unit> UnitList(Map<String, Object> param) {
        List<Unit> unitList = unitDao.UnitList(param);
        return unitList;
    }

    @Override
    public Integer AddByUnit(Unit unit) {
        Integer integer = unitDao.AddByUnit(unit);
        return integer;
    }

    @Override
    public Integer deleteByUnit(int unitId) {
        Integer integer = unitDao.deleteByUnit(unitId);
        return integer;
    }

    @Override
    public Integer updateByUnit(Unit unit) {
        Integer integer = unitDao.updateByUnit(unit);
        return integer;
    }
}
